<!--
 * @Author: xfworld
 * @Date: 2020-06-09 15:29:10
 * @LastEditors: xfworld
 * @LastEditTime: 2020-06-09 15:40:12
 * @Description:  banner
-->
<template>
  <div class="my-swipe">
    <van-swipe :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(item, index) in imageList" :key="index">
        <div v-if="item.image !== ''">
          <img v-lazy="image" />
        </div>
        <div v-else>
          {{ item.text }}
        </div>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>
<script>
export default {
  name: "homeBanner",
  data() {
    return {
      imageList: [
        {
          text: "1",
          image: ""
        },
        {
          text: "2",
          image: ""
        }
      ]
    };
  }
};
</script>

<style lang="less">
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
}
</style>
